<%@ page import="com.ming.javaweb.beans.VO.StudentVO" %><%--
  Created by IntelliJ IDEA.
  User: Tcm
  Date: 2021/6/25
  Time: 22:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>更新学生页面</title>
    <style>
        body {
            background-color: cornflowerblue;
        }
        #cont {
            text-align: center;
            margin-top: 100px;
        }
        #cont div {
            padding: 15px;
        }
    </style>
    <script>
        function resetForm() {
            document.forms[0].reset();
        }
    </script>
</head>
<body>
<div>
    <jsp:include page="/pages/top.jsp"/>
    <div id="cont">
        <form action="<%=request.getContextPath()%>/studentServlet?type=update" method="post" name="updateForm">
            <%
                StudentVO studentVO = (StudentVO) request.getAttribute("studentVO");
            %>
            <div>
                <%--@declare id="username"--%>
                <label>
                    学生编号:
                    <input type="text" readonly name="studentId" value="<%=studentVO.getId()%>"/>
                </label>
            </div>
            <div>
                <label>
                    学生姓名:
                    <%--                    pagescope  req  session  application--%>
                    <input type="text" name="studentName" value="${studentVO.name}"/>
                </label>
            </div>
            <div>
                <label >
                    学&emsp;&emsp;号:
                    <input type="text" name="no" value="${requestScope.studentVO.no}"/>
                </label>
            </div>
            <div>
                <label >
                    生&emsp;&emsp;日:
                    <input type="text" name="birthDay" placeholder="yyyy-MM-dd HH:mm:ss" value="${requestScope.studentVO.birthDay}"/>
                </label>
            </div>
            <div>
                <input type="submit" value="更新" onclick="login()">
<%--                <input type="button" onclick="" value="取消">--%>
                <a href="<%= request.getContextPath()%>/studentServlet?type=toStudentManage">取消</a>
            </div>
        </form>
    </div>
    <jsp:include page="/pages/bottom.jsp"/>
</div>
</body>
</html>
